home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume11 / tinymud2 / sysv_di.ffs < prev    next >
Encoding:
Internet Message Format  |  1991-04-03  |  8.4 KB

  1. Path: uunet!zephyr.ens.tek.com!master!saab!billr
  2. From: billr@saab.tek.com (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v12i046:  tinymud2 - user-extendible multi-user adventure (v1.5.4), sysv_diffs
  5. Message-ID: <914@masterCNA.TEK.COM>
  6. Date: 8 Mar 91 23:21:57 GMT
  7. Sender: news@masterCNA.TEK.COM
  8. Lines: 287
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: John Temples <jwt!john@uunet.UU.NET>
  12. Posting-number: Volume 12, Issue 46
  13. Archive-name: tinymud2/sysv_diffs
  14. Patch-to: tinymud2: Volume 12, Issue 46-46
  15. Environment: 
  16.  
  17.     [This is a set of patches to get tinymud2 running under
  18.      System V.  (Untested by me.)  -br]
  19.  
  20. #!/bin/sh
  21. # This is a shell archive (shar 3.32)
  22. # made 03/07/1991 05:00 UTC by john@jwt
  23. #
  24. # existing files WILL be overwritten
  25. #
  26. # This shar contains:
  27. # length  mode       name
  28. # ------ ---------- ------------------------------------------
  29. #    972 -rw-r--r-- README.sysv
  30. #   5017 -rw-r--r-- sysv.diffs
  31. #    310 -rw-r--r-- fakeselect.h
  32. #
  33. if touch 2>&1 | fgrep 'amc' > /dev/null
  34.  then TOUCH=touch
  35.  else TOUCH=true
  36. fi
  37. # ============= README.sysv ==============
  38. echo "x - extracting README.sysv (Text)"
  39. sed 's/^X//' << 'SHAR_EOF' > README.sysv &&
  40. XThese diffs allow TinyMUD to be built on a System V machine without
  41. Xnetworking by using named pipes for IPC.  They have been tested only
  42. Xunder System V/386 Release 3.2 (ESIX and ISC).  They were developed
  43. Xfor TinyMUD v1.5.4 as distributed in comp.sources.games, volume 11.
  44. XAlso required is the file xenix_diffs from the same c.s.g volume.
  45. X
  46. XHow to install:
  47. X
  48. X1. Unpack all archives.
  49. X2. Apply the Xenix diffs with "patch < xenix.diffs"
  50. X3. Apply the System V diffs with "patch < sysv.diffs"
  51. X4. Run "joinspl.sh".
  52. X5. Run a make.
  53. X6. The server is started by typing "fifonetmud dbfile dumpfile".
  54. X   "small.db" is included in the distribution and can be used for "dbfile".
  55. X7. The supplied client is "tinymud.sh"
  56. X
  57. XNotes:
  58. X
  59. XTinyMUD requires an ANSI C compiler.  gcc works fine.
  60. X
  61. XMy implementation of the FD_* macros in "fakeselect.h" will only
  62. Xallow about 14 players in the game.  A better implementation would be
  63. Xrequired to allow more players.
  64. X--
  65. XJohn W. Temples, III
  66. Xjohn@jwt.UUCP
  67. SHAR_EOF
  68. $TOUCH -am 0304154191 README.sysv &&
  69. chmod 0644 README.sysv ||
  70. echo "restore of README.sysv failed"
  71. set `wc -c README.sysv`;Wc_c=$1
  72. if test "$Wc_c" != "972"; then
  73.     echo original size 972, current size $Wc_c
  74. fi
  75. # ============= sysv.diffs ==============
  76. echo "x - extracting sysv.diffs (Text)"
  77. sed 's/^X//' << 'SHAR_EOF' > sysv.diffs &&
  78. X*** joinspl.sh    Mon Mar  4 14:42:29 1991
  79. X--- joinspl.sh    Mon Jan 28 09:56:47 1991
  80. X***************
  81. X*** 10,15 ****
  82. X  #
  83. X  # build tinymud.ps from its three parts
  84. X  #
  85. X! creating tinymud.ps
  86. X  cat tinymud.ps.xa? >tinymud.ps
  87. X  rm tinymud.ps.xa?
  88. X--- 10,15 ----
  89. X  #
  90. X  # build tinymud.ps from its three parts
  91. X  #
  92. X! echo creating tinymud.ps
  93. X  cat tinymud.ps.xa? >tinymud.ps
  94. X  rm tinymud.ps.xa?
  95. X*** fifoiface.c    Mon Mar  4 14:50:01 1991
  96. X--- fifoiface.c    Mon Mar  4 14:50:45 1991
  97. X***************
  98. X*** 16,22 ****
  99. X  #include <sys/types.h>
  100. X  #include <sys/file.h>
  101. X  #include <sys/stat.h>
  102. X! #include <sys/select.h>
  103. X  #include <signal.h>
  104. X  #include <sys/ioctl.h>
  105. X  #include <fcntl.h>
  106. X--- 16,22 ----
  107. X  #include <sys/types.h>
  108. X  #include <sys/file.h>
  109. X  #include <sys/stat.h>
  110. X! #include "fakeselect.h"
  111. X  #include <signal.h>
  112. X  #include <sys/ioctl.h>
  113. X  #include <fcntl.h>
  114. X***************
  115. X*** 178,187 ****
  116. X      fd_set r, w, x;
  117. X  
  118. X      if (timeout) sec=timeout->tv_sec+(timeout->tv_usec+500)/1000;
  119. X!     r= *rfds; w= *wfds; x= *xfds;
  120. X  
  121. X      while(1) {
  122. X!         *rfds=r; *wfds=w; *xfds=x;
  123. X          for(maxfd=fd=0;fd<maxd;++fd) {
  124. X              if(FD_ISSET(fd,rfds)) {
  125. X                  if (stat(fifonames[fd],&sbuf) != 0)
  126. X--- 178,187 ----
  127. X      fd_set r, w, x;
  128. X  
  129. X      if (timeout) sec=timeout->tv_sec+(timeout->tv_usec+500)/1000;
  130. X!     r= *rfds; w= *wfds;
  131. X  
  132. X      while(1) {
  133. X!         *rfds=r; *wfds=w;
  134. X          for(maxfd=fd=0;fd<maxd;++fd) {
  135. X              if(FD_ISSET(fd,rfds)) {
  136. X                  if (stat(fifonames[fd],&sbuf) != 0)
  137. X*** rename.c    Mon Mar  4 14:43:45 1991
  138. X--- rename.c    Mon Feb  4 09:51:21 1991
  139. X***************
  140. X*** 8,14 ****
  141. X      char buf[1024];
  142. X      int n;
  143. X      (void)unlink(new);
  144. X!     if (link(old, new) == -1 && errno != EXDEV)
  145. X          return(-1);
  146. X      if((fd1=open(old,0)) == -1)
  147. X          return(-1);
  148. X--- 8,18 ----
  149. X      char buf[1024];
  150. X      int n;
  151. X      (void)unlink(new);
  152. X!     if (link(old, new) == 0) {
  153. X!         unlink(old);
  154. X!         return 0;
  155. X!     }
  156. X!     else if (errno != EXDEV)
  157. X          return(-1);
  158. X      if((fd1=open(old,0)) == -1)
  159. X          return(-1);
  160. X*** Makefile    Mon Mar  4 14:44:17 1991
  161. X--- Makefile    Wed Feb  6 09:54:21 1991
  162. X***************
  163. X*** 9,16 ****
  164. X  
  165. X  # GCC:
  166. X  CC=gcc
  167. X! OPTIM= -g -W -Wreturn-type -Wunused -Wcomment -Wwrite-strings
  168. X! OPTIM= -W -Wreturn-type -Wunused -Wcomment -Wwrite-strings
  169. X  
  170. X  # Systems with 'cc' built from GCC (IBM RT, NeXT):
  171. X  #CC=cc
  172. X--- 9,17 ----
  173. X  
  174. X  # GCC:
  175. X  CC=gcc
  176. X! #OPTIM= -g -W -Wreturn-type -Wunused -Wcomment -Wwrite-strings
  177. X! OPTIM= -O -W -Wreturn-type -Wunused -Wcomment -Wwrite-strings -s
  178. X! LIBS= -lc_s
  179. X  
  180. X  # Systems with 'cc' built from GCC (IBM RT, NeXT):
  181. X  #CC=cc
  182. X***************
  183. X*** 74,80 ****
  184. X  
  185. X  DEFS= -DGOD_PRIV -DCOMPRESS -DQUIET_WHISPER -DGENDER -UHOST_NAME \
  186. X        -DCONNECT_MESSAGES -DPLAYER_LIST -DDETACH -DROBOT_MODE \
  187. X!       -DRECYCLE -DTINKER -DNOFAKES -UISLANDIA -DDEBUG
  188. X  
  189. X  CFLAGS= $(OPTIM) $(DEFS)
  190. X  
  191. X--- 75,82 ----
  192. X  
  193. X  DEFS= -DGOD_PRIV -DCOMPRESS -DQUIET_WHISPER -DGENDER -UHOST_NAME \
  194. X        -DCONNECT_MESSAGES -DPLAYER_LIST -DDETACH -DROBOT_MODE \
  195. X!       -DRECYCLE -DTINKER -DNOFAKES -UISLANDIA -DDEBUG -DDB_DOUBLING \
  196. X!       -DDB_INITIAL_SIZE=1000
  197. X  
  198. X  CFLAGS= $(OPTIM) $(DEFS)
  199. X  
  200. X***************
  201. X*** 119,125 ****
  202. X      $(CC) $(CFLAGS) -o netmud.conc interface.o $(OFILES)
  203. X  
  204. X  fifonetmud: $P fifoiface.o $(OFILES)
  205. X!     $(CC) $(CFLAGS) -o $@ fifoiface.o $(OFILES)
  206. X  match.h: copyright.h db.h
  207. X  netmud: $P oldinterface.o $(OFILES)
  208. X      -mv -f netmud netmud~
  209. X--- 121,127 ----
  210. X      $(CC) $(CFLAGS) -o netmud.conc interface.o $(OFILES)
  211. X  
  212. X  fifonetmud: $P fifoiface.o $(OFILES)
  213. X!     $(CC) $(CFLAGS) -o $@ fifoiface.o $(OFILES) $(LIBS)
  214. X  match.h: copyright.h db.h
  215. X  netmud: $P oldinterface.o $(OFILES)
  216. X      -mv -f netmud netmud~
  217. X***************
  218. X*** 131,153 ****
  219. X  
  220. X  dump: $P dump.o unparse.o $(DBOFILES)
  221. X      -rm -f dump
  222. X!     $(CC) $(CFLAGS) -o dump dump.o unparse.o $(DBOFILES) 
  223. X  
  224. X  sanity-check: $P sanity-check.o utils.o $(DBOFILES) 
  225. X      -rm -f sanity-check
  226. X!     $(CC) $(CFLAGS) -o sanity-check sanity-check.o utils.o $(DBOFILES)
  227. X  
  228. X  extract: $P extract.o utils.o $(DBOFILES) 
  229. X      -rm -f extract
  230. X!     $(CC) $(CFLAGS) -o extract extract.o utils.o $(DBOFILES)
  231. X  
  232. X  paths: $P paths.o unparse.o $(DBOFILES)
  233. X      -rm -f paths
  234. X!     $(CC) $(CFLAGS) -o paths paths.o unparse.o $(DBOFILES)
  235. X  
  236. X  decompress: $P decompress.o compress.o
  237. X      -rm -f decompress
  238. X!     $(CC) $(CFLAGS) -o decompress decompress.o compress.o
  239. X  
  240. X  clean:
  241. X      -rm -f *.o a.out core gmon.out $(OUTFILES)
  242. X--- 133,155 ----
  243. X  
  244. X  dump: $P dump.o unparse.o $(DBOFILES)
  245. X      -rm -f dump
  246. X!     $(CC) $(CFLAGS) -o dump dump.o unparse.o $(DBOFILES) $(LIBS)
  247. X  
  248. X  sanity-check: $P sanity-check.o utils.o $(DBOFILES) 
  249. X      -rm -f sanity-check
  250. X!     $(CC) $(CFLAGS) -o sanity-check sanity-check.o utils.o $(DBOFILES) $(LIBS)
  251. X  
  252. X  extract: $P extract.o utils.o $(DBOFILES) 
  253. X      -rm -f extract
  254. X!     $(CC) $(CFLAGS) -o extract extract.o utils.o $(DBOFILES) $(LIBS)
  255. X  
  256. X  paths: $P paths.o unparse.o $(DBOFILES)
  257. X      -rm -f paths
  258. X!     $(CC) $(CFLAGS) -o paths paths.o unparse.o $(DBOFILES) $(LIBS)
  259. X  
  260. X  decompress: $P decompress.o compress.o
  261. X      -rm -f decompress
  262. X!     $(CC) $(CFLAGS) -o decompress decompress.o compress.o $(LIBS)
  263. X  
  264. X  clean:
  265. X      -rm -f *.o a.out core gmon.out $(OUTFILES)
  266. SHAR_EOF
  267. $TOUCH -am 0304153191 sysv.diffs &&
  268. chmod 0644 sysv.diffs ||
  269. echo "restore of sysv.diffs failed"
  270. set `wc -c sysv.diffs`;Wc_c=$1
  271. if test "$Wc_c" != "5017"; then
  272.     echo original size 5017, current size $Wc_c
  273. fi
  274. # ============= fakeselect.h ==============
  275. echo "x - extracting fakeselect.h (Text)"
  276. sed 's/^X//' << 'SHAR_EOF' > fakeselect.h &&
  277. Xtypedef    long    fd_set;
  278. X
  279. Xstruct    timeval    {
  280. X    long    tv_sec;
  281. X    long    tv_usec;
  282. X};
  283. X
  284. X#define FD_SETSIZE (sizeof(fd_set) * 8)
  285. X#define FD_SET(fd, maskptr) (*maskptr |= (1 << fd))
  286. X#define FD_CLR(fd, maskptr) (*maskptr &= ~(1 << fd))
  287. X#define FD_ZERO(maskptr) (*maskptr = 0)
  288. X#define FD_ISSET(fd, maskptr) (*maskptr & (1 << fd))
  289. SHAR_EOF
  290. $TOUCH -am 0304150691 fakeselect.h &&
  291. chmod 0644 fakeselect.h ||
  292. echo "restore of fakeselect.h failed"
  293. set `wc -c fakeselect.h`;Wc_c=$1
  294. if test "$Wc_c" != "310"; then
  295.     echo original size 310, current size $Wc_c
  296. fi
  297. exit 0
  298.